const routes = [
  {
    path: '/',
    redirect: '/dashboard'
  },
  {
    path: '/login',
    name: 'Login',
    component: () => import('@/views/Login.vue'),
    meta: { title: '登录' }
  },
  {
    path: '/',
    component: () => import('@/components/Layout.vue'),
    children: [
      {
        path: '/dashboard',
        name: 'Dashboard',
        component: () => import('@/views/Dashboard.vue'),
        meta: { title: '仪表盘', icon: 'Odometer' }
      },
      {
        path: '/profile',
        name: 'Profile',
        component: () => import('@/views/Profile.vue'),
        meta: { title: '个人资料', icon: 'User' }
      },
      {
        path: '/projects',
        name: 'Projects',
        component: () => import('@/views/Projects.vue'),
        meta: { title: '项目管理', icon: 'FolderOpened' }
      },
      {
        path: '/skills',
        name: 'Skills',
        component: () => import('@/views/Skills.vue'),
        meta: { title: '技能管理', icon: 'Star' }
      },
      {
        path: '/experience',
        name: 'Experience',
        component: () => import('@/views/Experience.vue'),
        meta: { title: '经历管理', icon: 'Briefcase' }
      },
      {
        path: '/education',
        name: 'Education',
        component: () => import('@/views/Education.vue'),
        meta: { title: '教育管理', icon: 'School' }
      },
      {
        path: '/contact',
        name: 'Contact',
        component: () => import('@/views/Contact.vue'),
        meta: { title: '联系信息', icon: 'Message' }
      },
      {
        path: '/system',
        name: 'System',
        redirect: '/system/dict-management',
        meta: { title: '系统管理', icon: 'Setting' },
        children: [
          {
            path: '/system/dict-management',
            name: 'DictManagement',
            component: () => import('@/views/DictManagement.vue'),
            meta: { title: '字典管理', icon: 'Document' }
          },
          {
            path: '/system/settings',
            name: 'Settings',
            component: () => import('@/views/Settings.vue'),
            meta: { title: '系统设置', icon: 'Monitor' }
          }
        ]
      }
    ]
  }
]

export default routes